// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 GET /auth/captcha */
export async function getCaptcha(options?: { [key: string]: any }) {
  return request<UserService.ResultMapStringString>(`/user/auth/captcha`, {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /auth/login */
export async function login(body: UserService.UserLoginDTO, options?: { [key: string]: any }) {
  return request<UserService.Result>(`/user/auth/login`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /auth/logout */
export async function logout(options?: { [key: string]: any }) {
  return request<UserService.ResultString>(`/user/auth/logout`, {
    method: 'POST',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /auth/register */
export async function register(
  body: UserService.UserRegisterDTO,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultObject>(`/user/auth/register`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /auth/resetPasswordByEmail */
export async function resetPasswordByEmail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.resetPasswordByEmailParams,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultString>(`/user/auth/resetPasswordByEmail`, {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /auth/sendResetEmail */
export async function sendResetEmail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.sendResetEmailParams,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultString>(`/user/auth/sendResetEmail`, {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}
